package com.tenbent.product.center.insures.bo;

import com.tenbent.product.base.bo.BizObject;
import com.tenbent.product.base.mybatis.annotations.TypeAlias;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 保障项目大类型
 *
 * @author Randy
 *
 *         Created by ThinkPad on 2017/8/21.
 */
@Entity
@Table(name = "pc_safeguard_category_type")
@TypeAlias("safeguardCategoryType")
public class SafeguardCategoryType extends BizObject {

	/** 产品ID **/
	@Column(name = "product_id")
	private Integer productId;

	/** 类型代码 **/
	@Column(name = "type_code")
	private String typeCode;

	/** 类型名称 **/
	@Column(name = "type_name")
	private String typeName;

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		SafeguardCategoryType that = (SafeguardCategoryType) o;

		if (productId != null ? !productId.equals(that.productId) : that.productId != null)
			return false;
		if (typeCode != null ? !typeCode.equals(that.typeCode) : that.typeCode != null)
			return false;
		return typeName != null ? typeName.equals(that.typeName) : that.typeName == null;

	}

	@Override
	public int hashCode() {
		int result = productId != null ? productId.hashCode() : 0;
		result = 31 * result + (typeCode != null ? typeCode.hashCode() : 0);
		result = 31 * result + (typeName != null ? typeName.hashCode() : 0);
		return result;
	}

	@Override
	public String toString() {
		return "SafeguardCategoryType{" + "productId=" + productId + ", typeCode='" + typeCode + '\'' + ", typeName='"
				+ typeName + '\'' + '}';
	}
}
